package order.model;

import java.io.Serializable;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;

import org.codehaus.jackson.map.annotate.JsonSerialize;

@JsonSerialize(include=JsonSerialize.Inclusion.NON_DEFAULT)
public class OpenTable implements Serializable
{
	private static final long serialVersionUID = -6239985066795190755L;
	
	private int orderId;
	private int tableId;
	private int personNumber;
	private Timestamp orderDate;
	private int waiterId;
	private int orderStatus;
	private float originalAmount;//原总价
	private float realAmount;//实际进账
	
	private List<OrderItem> orderItems = new ArrayList<OrderItem>();
	
	public OpenTable(){}
	
	public OpenTable(int orderId, int tableId, int personNumber,
			Timestamp orderDate, int waiterId, int orderStatus,
			float originalAmount, float realAmount)
	{
		super();
		this.orderId = orderId;
		this.tableId = tableId;
		this.personNumber = personNumber;
		this.orderDate = orderDate;
		this.waiterId = waiterId;
		this.orderStatus = orderStatus;
		this.originalAmount = originalAmount;
		this.realAmount = realAmount;
	}
	
	public List<OrderItem> getOrderItems()
	{
		return this.orderItems;
	}
	
	public void addOrderItem(OrderItem orderItem)
	{
		this.orderItems.add(orderItem);
	}
	
	public int getOrderId()
	{
		return orderId;
	}
	public void setOrderId(int orderId)
	{
		this.orderId = orderId;
	}
	public int getTableId()
	{
		return tableId;
	}
	public void setTableId(int tableId)
	{
		this.tableId = tableId;
	}
	public int getPersonNumber()
	{
		return personNumber;
	}
	public void setPersonNumber(int personNumber)
	{
		this.personNumber = personNumber;
	}
	public Timestamp getOrderDate()
	{
		return orderDate;
	}
	public void setOrderDate(Timestamp orderDate)
	{
		this.orderDate = orderDate;
	}
	public int getWaiterId()
	{
		return waiterId;
	}
	public void setWaiterId(int waiterId)
	{
		this.waiterId = waiterId;
	}
	public int getOrderStatus()
	{
		return orderStatus;
	}
	public void setOrderStatus(int orderStatus)
	{
		this.orderStatus = orderStatus;
	}
	public float getOriginalAmount()
	{
		return originalAmount;
	}
	public void setOriginalAmount(float originalAmount)
	{
		this.originalAmount = originalAmount;
	}
	public float getRealAmount()
	{
		return realAmount;
	}
	public void setRealAmount(float realAmount)
	{
		this.realAmount = realAmount;
	}
	
}
